<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/prism-tomorrow.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/all.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/custom.css') }}">
    <title>{% block title %} {% endblock %}</title>
    <style>
        body {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)) url("{{ url_for('static', filename='images/bg-pattern.jpg') }}") fixed;
        }

        .container {
            flex: 1;
            background: rgba(255, 255, 255, 0.9);
            padding: 2rem;
            border-radius: 15px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            margin-top: 2rem;
            margin-bottom: 2rem;
        }

        .navbar {
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            background: rgba(255, 255, 255, 0.95) !important;
        }

        .nav-link {
            transition: all 0.3s ease;
            font-weight: 500;
            margin: 0 10px;
            padding: 8px 15px !important;
            border-radius: 20px;
        }

        .nav-link:hover {
            background: #f8f9fa;
            transform: translateY(-2px);
        }

        .navbar-brand {
            font-weight: 700;
            color: #2c3e50 !important;
            letter-spacing: 1px;
        }

        .content-card {
            background: white;
            border-radius: 12px;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        footer {
            background: #2c3e50;
            color: white;
            padding: 1.5rem 0;
            margin-top: auto;
        }

        .alert {
            border-radius: 8px;
        }

        @media (max-width: 768px) {
            .container {
                margin: 1rem;
                padding: 1rem;
            }
        }
    </style>
</head>
<body>
    <nav class="navbar navbar-expand-md navbar-light">
        <div class="container">
            <a class="navbar-brand" href="{{ url_for('index') }}">Zeeker码头的博客</a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
                aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ml-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('new') }}">📝 新建文章</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('about') }}">👨💻 关于作者</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <div class="container">
        {% for message in get_flashed_messages() %}
        <div class="alert alert-success auto-dismiss">
            {{ message }}
        </div>
        {% endfor %}

        <div class="content-card">
            {% block content %} {% endblock %}
        </div>
    </div>

    <footer>
        <div class="container text-center">
            <p class="mb-0">© 2025 Zeeker码头的博客 ⋅ 基于Flask构建 ⋅ 探索技术的无限可能</p>
            <div class="mt-2">
                <a href="#" class="text-light mx-2">友情链接</a>
                <a href="#" class="text-light mx-2">使用条款</a>
                <a href="#" class="text-light mx-2">隐私政策</a>
            </div>
        </div>
    </footer>

    <script src="{{ url_for('static', filename='js/jquery-3.6.0.slim.js') }}"></script>
    <script src="{{ url_for('static', filename='js/popper.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/prism.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/prism-autoloader.min.js') }}"></script>

</body>
<script>
document.addEventListener('DOMContentLoaded', function() {
    setTimeout(function() {
        document.querySelectorAll('.auto-dismiss').forEach(function(alert) {
            alert.style.opacity = '0';
            setTimeout(() => alert.remove(), 500);
        });
    }, 3000);
});
</script>
</html>